package stud.aistar.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.mapper.CommentUserVoMapper;
import stud.aistar.service.ICommentUserVoService;
import stud.aistar.vo.CommentUserVo;

import java.util.List;

/**
 * *
 *
 * @ClassName :wangyu
 * @Description
 * @Author
 * @Date2019/10/18 22:09
 * @Version V1.0
 */
@Service
@Transactional
public class CommentUserVoServiceImpl implements ICommentUserVoService {

    @Autowired
    private CommentUserVoMapper mapper;

    @Override
    public PageInfo<CommentUserVo> findAll(Integer pageNum, Integer pageSize, Integer did) {

        PageHelper.startPage(pageNum,pageSize);

        List<CommentUserVo> list = mapper.findAll(did);

        PageInfo<CommentUserVo> pageInfo = new PageInfo<>(list);

        return pageInfo;
    }

    @Override
    public List<CommentUserVo> findAll(Integer dId) {
        return null;
    }
}
